package com.s2u2m.training.ex_programmer.interface_segregation.good;

public class GoodPractice {
    public static void main(String[] args) {
        Rectangle rectangle = new Rectangle(1, 2);
        calculateArea(rectangle);
        printShape(rectangle);
    }

    private static void calculateArea(Shape shape) {
        System.out.println(shape.area());
    }

    private static void printShape(ShapePrinter shape) {
        shape.print();
    }
}
